
//  YDOAInsuranceApplyVC.swift
//  YDOAProduct
//
//  Created by YDWY on 2017/6/13.
//  Copyright © 2017年 Allen. All rights reserved.
//

import UIKit

class YDOAInsuranceApplyVC: UIViewController {

    @IBOutlet weak var updataBtn: UIButton!
    @IBOutlet weak var catName: UITextField!
    @IBOutlet weak var catNum: UITextField!
    @IBOutlet weak var insuranceCount: UITextField!
    @IBOutlet weak var imgView: UIImageView!
    @IBOutlet weak var imgHeigth: NSLayoutConstraint!
    @IBOutlet weak var viewHeight: NSLayoutConstraint!
    override func viewDidLoad() {
        super.viewDidLoad()
        self.title = "保险提交"
        // Do any additional setup after loading the view.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    
    //上传凭证
    @IBAction func updata(_ sender: Any) {
        
        let imgPickerVC  = YMImgPickerVC()
        imgPickerVC.modalPresentationStyle = .overCurrentContext //模态视图的展现形式
        imgPickerVC.view.backgroundColor = UIColor(white: 0.3, alpha: 0.7) //视图的背景颜色
        
        weak var weakSelf = self
        imgPickerVC.callbackWithImg = {(imgData:Data) in
            
            weakSelf?.imgHeigth.constant = 100
            weakSelf?.imgView.image = UIImage(data: imgData)
            weakSelf?.viewHeight.constant = 400
        }
        
        self.present(imgPickerVC, animated: true, completion: {
            
        })

        
    }

    //确认按钮点击
    @IBAction func sureBtnclick(_ sender: Any) {
        
        navigationController?.pushViewController(YDOASucceedVC(), animated: true)
    }
    
}
